﻿using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using WebAPI.Filters;
using wt.wine.Application.Common.Models;
using wt.wine.Application.OutWineCommand.Command;

namespace WebAPI.Controllers.V1
{
    [ApiController]
    [Route("[controller]/[action]")]
    public class ManageOutWineController : ApiControllerBase
    {

        /// <summary>
        /// 出酒校准
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        [PermissioneFilter("ManageDevicetable")]
        [HttpPost]
        public async Task<Json<string>> CheckWind([FromBody] CheckWineCommand command)
        {
            return await Mediator.Send(command);
        }

        /// <summary>
        /// 校准提交
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        [PermissioneFilter("ManageDevicetable")]
        [HttpPost]
        public async Task<Json<string>> CalibrationSubmit([FromBody] CalibrationSubmitCommand command)
        {
            return await Mediator.Send(command);
        }
    }
}
